| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

TextureUtils.h
1 // TextureUtils.h
3 //
5
6 namespace nkGraphics
7 {
11 class TextureUtils final
12 {
13 public :
14
19 static unsigned int getFormatByteSize (FORMAT format) ;
24 static unsigned int getFormatChannelCount (FORMAT format) ;
29 static unsigned int getFormatPlaneCount (FORMAT format) ;
34 static FORMAT getFormatSrgbEquivalent (FORMAT format) ;
39 static FORMAT getFormatRgbEquivalent (FORMAT format) ;
44 static FORMAT getFormatTypelessEquivalent (FORMAT format) ;
49 static FORMAT getFormatDepthEquivalent (FORMAT format) ;
54 static FORMAT getFormatUncompressedEquivalent (FORMAT format) ;
59 static FORMAT getFormatWithAlphaEquivalent (FORMAT format) ;
60
65 static bool isFormatOver255 (FORMAT format) ;
72 static bool isFormatCompressed (FORMAT format) ;
79 static bool isFormatCompatibleWithStencil (FORMAT format) ;
86 static bool isFormatCompatibleForRenderFlag (FORMAT format, TEXTURE_RENDER_FLAG renderFlag, BUFFER_BIND_FLAG bindFlag) ;
87
95 static int getNeededMipsForSize (int width, int height, int depthOrArraySize, bool texArray) ;
96
97 // nkImages interop
102 static FORMAT getFormatFromImageFormat (nkImages::PIXEL_FORMAT format) ;
103 } ;
104 }
nkGraphics::TextureUtils
Utility class to retrieve or compute interesting data about textures.
Definition: TextureUtils.h:12
nkGraphics::TextureUtils::getFormatDepthEquivalent
static FORMAT getFormatDepthEquivalent(FORMAT format)
nkGraphics::TextureUtils::getFormatByteSize
static unsigned int getFormatByteSize(FORMAT format)
nkGraphics::TextureUtils::getFormatFromImageFormat
static FORMAT getFormatFromImageFormat(nkImages::PIXEL_FORMAT format)
nkGraphics::TextureUtils::getFormatSrgbEquivalent
static FORMAT getFormatSrgbEquivalent(FORMAT format)
nkGraphics::TextureUtils::isFormatCompatibleForRenderFlag
static bool isFormatCompatibleForRenderFlag(FORMAT format, TEXTURE_RENDER_FLAG renderFlag, BUFFER_BIND_FLAG bindFlag)
nkGraphics::TextureUtils::isFormatCompatibleWithStencil
static bool isFormatCompatibleWithStencil(FORMAT format)
nkGraphics::TextureUtils::getFormatChannelCount
static unsigned int getFormatChannelCount(FORMAT format)
nkGraphics::TextureUtils::isFormatOver255
static bool isFormatOver255(FORMAT format)
nkGraphics::TextureUtils::getFormatUncompressedEquivalent
static FORMAT getFormatUncompressedEquivalent(FORMAT format)
nkGraphics::TextureUtils::isFormatCompressed
static bool isFormatCompressed(FORMAT format)
nkImages::PIXEL_FORMAT
PIXEL_FORMAT
Lists formats for pixels.
Definition: PixelFormat.h:16
nkGraphics::TextureUtils::getFormatRgbEquivalent
static FORMAT getFormatRgbEquivalent(FORMAT format)
nkGraphics::TextureUtils::getFormatTypelessEquivalent
static FORMAT getFormatTypelessEquivalent(FORMAT format)
nkGraphics::FORMAT
FORMAT
Available formats for resources.
Definition: DxDefinesWrapper.h:13
nkGraphics::TextureUtils::getNeededMipsForSize
static int getNeededMipsForSize(int width, int height, int depthOrArraySize, bool texArray)
nkGraphics
Encompasses all API of component NilkinsGraphics.
Definition: BoundingBox.h:7
nkGraphics::TextureUtils::getFormatWithAlphaEquivalent
static FORMAT getFormatWithAlphaEquivalent(FORMAT format)
nkGraphics::TextureUtils::getFormatPlaneCount
static unsigned int getFormatPlaneCount(FORMAT format)
nkGraphics::BUFFER_BIND_FLAG
BUFFER_BIND_FLAG
Available binding flags for buffers.
Definition: BufferBindFlag.h:12
nkGraphics::TEXTURE_RENDER_FLAG
TEXTURE_RENDER_FLAG
The render flag possible for a texture.
Definition: TextureRenderFlag.h:12